package com.iplant.basic.service.po.update;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * Po模板导入头信息
 *
 * @author YouWang·Peng
 * 2024-3-10 11:02:58
 */
public class CAPoHead {
    /**
     * 实体类描述
     */
    public String Description = "";
    /**
     * 表名
     */
    public String TableName = "";
    /**
     * 检查重复字段
     */
    public List<String> CheckCodeList = new ArrayList<>();
    /**
     * 编码自动生成
     */
    public boolean IsCodeAuto = false;
    /**
     * 编码前缀
     */
    public String CodePrefix = "";
    /**
     * 序列号长度：
     */
    public int SerialCodeNum = 0;
    /**
     * 数据库实例
     */
    public String Schema = "";
    /**
     * 是否有Code字段
     */
    public boolean IsHasCode = false;
    /**
     * 是否有Name字段
     */
    public boolean IsHasName = false;
    /**
     * 是否有Active字段
     */
    public boolean IsHasActive = false;
    /**
     * 自动建表
     */
    public boolean IsAutoCreateTable = false;
    /**
     * 属性列表
     */
    public List<CAPoProp> PoPropList = new ArrayList<>();

    public CAPoHead() {
    }

    public CAPoHead(String description, String tableName, List<String> checkCodeList, boolean isCodeAuto,
                    String codePrefix, int serialCodeNum, String schema, boolean isHasCode, boolean isHasName,
                    boolean isHasActive, boolean isAutoCreateTable, List<CAPoProp> poPropList) {
        Description = description;
        TableName = tableName;
        CheckCodeList = checkCodeList;
        IsCodeAuto = isCodeAuto;
        CodePrefix = codePrefix;
        SerialCodeNum = serialCodeNum;
        Schema = schema;
        IsHasCode = isHasCode;
        IsHasName = isHasName;
        IsHasActive = isHasActive;
        IsAutoCreateTable = isAutoCreateTable;
        PoPropList = poPropList;
    }

    @JsonProperty("Description")
    public String getDescription() {
        return Description;
    }

    public void setDescription(String description) {
        Description = description;
    }

    @JsonProperty("TableName")
    public String getTableName() {
        return TableName;
    }

    public void setTableName(String tableName) {
        TableName = tableName;
    }

    @JsonProperty("CheckCodeList")
    public List<String> getCheckCodeList() {
        return CheckCodeList;
    }

    public void setCheckCodeList(List<String> checkCodeList) {
        CheckCodeList = checkCodeList;
    }

    @JsonProperty("IsCodeAuto")
    public boolean isCodeAuto() {
        return IsCodeAuto;
    }

    public void setCodeAuto(boolean codeAuto) {
        IsCodeAuto = codeAuto;
    }

    @JsonProperty("CodePrefix")
    public String getCodePrefix() {
        return CodePrefix;
    }

    public void setCodePrefix(String codePrefix) {
        CodePrefix = codePrefix;
    }

    @JsonProperty("SerialCodeNum")
    public int getSerialCodeNum() {
        return SerialCodeNum;
    }

    public void setSerialCodeNum(int serialCodeNum) {
        SerialCodeNum = serialCodeNum;
    }

    @JsonProperty("Schema")
    public String getSchema() {
        return Schema;
    }

    public void setSchema(String schema) {
        Schema = schema;
    }

    @JsonProperty("IsHasCode")
    public boolean isHasCode() {
        return IsHasCode;
    }

    public void setHasCode(boolean hasCode) {
        IsHasCode = hasCode;
    }

    @JsonProperty("IsHasName")
    public boolean isHasName() {
        return IsHasName;
    }

    public void setHasName(boolean hasName) {
        IsHasName = hasName;
    }

    @JsonProperty("IsHasActive")
    public boolean isHasActive() {
        return IsHasActive;
    }

    public void setHasActive(boolean hasActive) {
        IsHasActive = hasActive;
    }

    @JsonProperty("IsAutoCreateTable")
    public boolean isAutoCreateTable() {
        return IsAutoCreateTable;
    }

    public void setAutoCreateTable(boolean autoCreateTable) {
        IsAutoCreateTable = autoCreateTable;
    }
}
